package com.multithreading.chart1.deadlock;

/**
 * @author chenqb
 * @project_name: java-multithreading
 * @package_name: com.cqb.deadlock
 * @ClassName: DaemonAndUser
 * @description: 守护线程和用户线程
 * Author by cqb, Date on 2020/7/7，7:36
 * PS: Not easy to write code, please indicate.
 */
public class DaemonAndUser {
    public static void main(String[] args) {
        Thread daemonThread = new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println("hello molike");
            }
        });
        //设置守护线程
        daemonThread.setDaemon(true);
        daemonThread.start();
        System.out.println("main thread is over!");
    }
}
